21 lines · 665 B · Text
RawDownload
module Default happyPairs : List (Nat, Char)happyPairs = map (uncurry $ \ c, n => (n, c)) [('a', 1)] -- In Idris1 `sadPairs` is rejected with the following error:--    |-- 10 | sadPairs = map (\ (c, n) => (n, c)) [('a', 1)]--    |                             ~~-- When checking right hand side of Default.case block in sadPairs at Default.idr:10:19-24 with expected type--         (Nat, Char) -- When checking argument a to constructor Builtins.MkPair:--         Type mismatch between--                 Integer (Type of n)--         and--                 Nat (Expected type)  sadPairs : List (Nat, Char)sadPairs = map (\ (c, n) => (n, c)) [('a', 1)]

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t