conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Expand test code a bit with pure parsing\n"
},
{
"from": "human",
"value": "module Main\n\nimport Data.String.Parser\nimport Control.Monad.Identity\nimport Control.Monad.Trans\n\n%default partial\n-- Buld this program with '-p contrib'\n\nparseStuff : ParseT IO ()\n... | idris | chosen |
[
{
"from": "system",
"value": "Fix indentation, use monomorphic projections for pairs.\n"
},
{
"from": "human",
"value": "module Prelude.Pairs\n\nimport Builtins\n\n%access public\n%default total\n\nusing (a : Type, P : a -> Type)\n\n ||| Dependent pair where the first field is erased.\n da... | idris | chosen |
[
{
"from": "system",
"value": "Update API test for new Codegen fields\n"
},
{
"from": "human",
"value": "module Main\n\nimport Core.Context\nimport Compiler.Common\nimport Idris.Driver\n\ncompile : Ref Ctxt Defs -> (tmpDir : String) -> (execDir : String) ->\n ClosedTerm -> (outfile : Str... | idris | chosen |
[
{
"from": "system",
"value": "Make \"simple\" a bit more flexible\n\nSigned-off-by: Ricky Elrod <3de8762d49a778edd8b1aa9f381ea5a9ccb62944@elrod.me>\n"
},
{
"from": "human",
"value": "import Network.Socket\nimport Http\nimport Http.Uri\nimport Http.RawResponse\nimport Http.Request\nimport Http.Re... | idris | chosen |
[
{
"from": "system",
"value": "Make the comments more explicit.\n"
},
{
"from": "human",
"value": "module Data.String.Iterator\n\nexport\nrecord StringIterator where\n constructor MkSI\n string : String\n\n -- backend-dependent offset into the string\n -- see prim__readChar below\n offset : ... | idris | chosen |
[
{
"from": "system",
"value": "Fix way long line [ci skip]\n\nSigned-off-by: Ricky Elrod <3de8762d49a778edd8b1aa9f381ea5a9ccb62944@elrod.me>\n"
},
{
"from": "human",
"value": "module Http\n\nimport Http.Uri\nimport Http.Request\nimport Network.Socket\n\n%access public\n\ndata RawResponse = MkRawR... | idris | chosen |
[
{
"from": "system",
"value": "Add monadic functions filterM and mapTupleM\n"
},
{
"from": "human",
"value": "-- Copyright (c) 2013 Radek Micek\n\nmodule Common\n\ninfixr 1 ??, >=>\n\n(??) : a -> (a -> b) -> b\na ?? f = f a\n\n(>=>) : Monad m => (a -> m b) -> (b -> m c) -> a -> m c\nf >=> g = \\a... | idris | chosen |
[
{
"from": "system",
"value": "Add `ltePlus` and `lteMult` to contrib.\n"
},
{
"from": "human",
"value": "module Data.Nat\n\n%default total\n\ndiff : Nat -> Nat -> Nat\ndiff k Z = k\ndiff Z j = j\ndiff (S k) (S j) = diff k j\n"
},
{
"from": "gpt",
"value": "module Data.Nat\n\n%default... | idris | chosen |
[
{
"from": "system",
"value": "Make `and`, `or`, `any`, and `all` short-circuit from left-to-right, as is more natural.\n"
},
{
"from": "human",
"value": "module Prelude.Foldable\n\nimport Builtins\nimport Prelude.Bool\nimport Prelude.Classes\nimport Prelude.Algebra\n\n%access public\n%default to... | idris | chosen |
[
{
"from": "system",
"value": "Add isYes function and friends\n\nAdded several functions for `Dec`. The set of functions and names\nare picked consistently with `Maybe`:\n\n* `isNothing` -> `isNo`\n* `isJust` -> `isYes`\n* `IsJust` -> `IsYes`\n* `isItJust` -> `isItYes`\n\nThis is follow-up to #942\n"
},
... | idris | chosen |
[
{
"from": "system",
"value": "Change Port from String to Int and add some documentation\n"
},
{
"from": "human",
"value": "module Http\n\ndata Method = POST | GET\n\nHost : Type\nHost = String\n\nPort : Type\nPort = String\n\nHttpVersion : Type\nHttpVersion = String\n\nrecord Request where\n co... | idris | chosen |
[
{
"from": "system",
"value": "Write out the states in more consise notation.\n"
},
{
"from": "human",
"value": "module Main\n\nmutual\n\n data Locked : Type where\n Start : Locked\n Lock : Closed -> Locked\n\n data Closed : Type where\n Close : Opened -> Closed\n Unlock : Locke... | idris | chosen |
[
{
"from": "system",
"value": "Move 'mkNo' to a where\n"
},
{
"from": "human",
"value": "module Data.List\n\n%access public\n\nusing (xs : List a)\n ||| A proof that some element is found in a list\n data Elem : a -> List a -> Type where\n Here : Elem x (x :: xs)\n There : Elem x xs... | idris | chosen |
[
{
"from": "system",
"value": "Simplify code of simple example\n"
},
{
"from": "human",
"value": "import Http\nimport Http.Uri\nimport Http.Error\nimport Http.RawResponse\nimport Http.Request\nimport Http.Response\nimport Data.SortedMap -- Remove after upgrading to idris 0.9.19\nimport Network.So... | idris | chosen |
[
{
"from": "system",
"value": "Add comments to explain the process of creating the FSM.\n"
},
{
"from": "human",
"value": "module Main\nimport Data.List\n%language TypeProviders\n%default total\n\ndata Choice : List a -> Type\nwhere Choose : (x : a) ->\n {xs : List a} ->\n ... | idris | chosen |
[
{
"from": "system",
"value": "Fix bug when not passing port number\n\nSigned-off-by: Ricky Elrod <3de8762d49a778edd8b1aa9f381ea5a9ccb62944@elrod.me>\n"
},
{
"from": "human",
"value": "import Http\nimport Http.Uri\nimport Http.RawResponse\nimport Http.Request\nimport Http.Response\nimport Network... | idris | chosen |
[
{
"from": "system",
"value": "Add <$> as an alias for map\n"
},
{
"from": "human",
"value": "module Prelude.Functor\n\nimport Prelude.Basics\n\n||| Functors\n||| @ f the action of the functor on objects\nclass Functor (f : Type -> Type) where\n ||| The action of the functor on morphisms\n ... | idris | chosen |
[
{
"from": "system",
"value": "Add a function for dealing with absurdity\n\nNow, if a type is known to be uninhabited, `absurd` will immediately\nfind the proof of uninhabitedness and apply `FalseElim` to it. This can\ninhabit any type.\n\nExample:\n\n foo : Fin Z -> String\n foo f = absurd f\n"
},
... | idris | chosen |
[
{
"from": "system",
"value": "Remove whitespace in test file\n"
},
{
"from": "human",
"value": "%default total\n\ndata TTy : Nat -> Nat -> Nat -> Nat -> Bool -> Type where\n\n TA : TTy p1 r1 i1 i2 False ->\n TTy i1 i2 i1 u2 False ->\n TTy i1 i2 p2 b1 b2 ->\n TTy p1 r1 p1 i2... | idris | chosen |
[
{
"from": "system",
"value": "Remove my debugging noise from test case\n"
},
{
"from": "human",
"value": "interface Queue (q: Type -> Type) where \n empty : q a \n isEmpty : q a -> Bool\n snoc : q a -> a -> q a \n head : q a -> a\n tail : q a -> q a\n\ndata CatList : (Type -> Type) -> Typ... | idris | chosen |
[
{
"from": "system",
"value": "Fix compilation error with newer Idris\n"
},
{
"from": "human",
"value": "module IR.Layout\n\nimport IR\nimport IR.StackSet\n\n%default total\n\ncolumn : Rectangle -> (n : Nat) -> Vect n Rectangle\ncolumn r n = column' n r n\n where column' _ _ Z = []\n colu... | idris | chosen |
[
{
"from": "system",
"value": "Add a missing `covering` annotation.\n"
},
{
"from": "human",
"value": "module Data.String.Iterator\n\n%default total\n\nexport\ndata StringIterator : Type where [external]\n\n%foreign\n \"scheme:blodwen-string-iterator-new\"\nexport\nfromString : String -> StringI... | idris | chosen |
[
{
"from": "system",
"value": "Add iso between String and List Char\n"
},
{
"from": "human",
"value": "module Control.Isomorphism.Primitives\n\nimport Control.Isomorphism\nimport Data.ZZ\n\n%default total\n%access public\n\n-- This module contains isomorphisms between convenient inductive types a... | idris | chosen |
[
{
"from": "system",
"value": "Add Uninhabited instances for so False\n\nFixes #1168\n"
},
{
"from": "human",
"value": "module Prelude.Bool\n\nimport Builtins\n\n||| Boolean Data Type\ndata Bool = False | True\n\n||| The underlying implementation of the if ... then ... else ... syntax\n||| @ b th... | idris | chosen |
[
{
"from": "system",
"value": "Add path and query to Request\n"
},
{
"from": "human",
"value": "module Http\n\n||| The HTTP Method which is either POST or GET\ndata Method = POST | GET\n\n||| A String-alias for Hosts.\nHost : Type\nHost = String\n\n||| Port is an alias for Int.\n-- Todo: Maybe de... | idris | chosen |
[
{
"from": "system",
"value": "Add spaces for better overview when doing talks\n"
},
{
"from": "human",
"value": "module Test\n\nimport Provider\n\nimport Database\nimport Queries\n\n%language TypeProviders\n\n%link C \"sqlite3api.o\"\n%include C \"sqlite3api.h\"\n%lib C \"sqlite3\"\n\n%provide (... | idris | chosen |
[
{
"from": "system",
"value": "Use Maybe void in threading.\n"
},
{
"from": "human",
"value": "module Python.Lib.Threading\n\nimport Python\nimport Python.Prim\nimport Python.Exceptions\n\nimport Python.Lib.Queue\n\n%default total\n%access public\n\nThread : Signature\nThread f = case f of\n \"s... | idris | chosen |
[
{
"from": "system",
"value": "Make it use the constructor name [ci skip]\n\nSigned-off-by: Ricky Elrod <3de8762d49a778edd8b1aa9f381ea5a9ccb62944@elrod.me>\n"
},
{
"from": "human",
"value": "module Http.Response\n\nimport Data.Vect\nimport Http.RawResponse\n\n%access public\n\nrecord ResponseStat... | idris | chosen |
[
{
"from": "system",
"value": "Set a combination that needs to match for unlocking.\n"
},
{
"from": "human",
"value": "module Main\n\nmutual\n\n data Locked = Start | Lock Closed\n data Closed = Close Opened | Unlock Locked\n data Opened = Open Closed\n"
},
{
"from": "gpt",
"value"... | idris | chosen |
[
{
"from": "system",
"value": "Add commonly used definitions of Parser and parse.\n"
},
{
"from": "human",
"value": "module Lightyear.String_\n-- Reserved words cannot be used in module names.\n-- Unfortunately, String is a reserved word.\n\nimport Lightyear.Core\nimport Lightyear.Combinators\n\n... | idris | chosen |
[
{
"from": "system",
"value": "Read until EOF, not just one packet\n\nAlso nuke port from Host header\n\nSigned-off-by: Ricky Elrod <3de8762d49a778edd8b1aa9f381ea5a9ccb62944@elrod.me>\n"
},
{
"from": "human",
"value": "module Http\n\nimport public Http.Uri\nimport public Http.Error\nimport public... | idris | chosen |
[
{
"from": "system",
"value": "Remove bindning to `y` as no longer necessary\n"
},
{
"from": "human",
"value": "||| Until Idris2 starts supporting the 'syntax' keyword, here's a\n||| poor-man's equational reasoning\nmodule Syntax.PreorderReasoning\n\ninfixl 0 ~~\nprefix 1 |~\ninfix 1 ...\n\n|... | idris | chosen |
[
{
"from": "system",
"value": "Fix \"int\" -> \"integer\" to avoid double\n"
},
{
"from": "human",
"value": "module Parser\n\nimport Lightyear.Core\nimport Lightyear.Strings\nimport Lightyear.Combinators\nimport Queries\n\nsqltype : Parser SQLiteType\nsqltype = the (Parser _) $\n (do tok... | idris | chosen |
[
{
"from": "human",
"value": "Add a sample of named instances\n"
},
{
"from": "gpt",
"value": "> module MyOrd\n\nAn alternative Ord instance for Nats, with an explicit name \"myord\"\nfor the dictionary:\n\n> instance [myord] Ord Nat where\n> compare O (S n) = GT\n> compare (S n) O ... | idris | chosen |
[
{
"from": "human",
"value": "Add port of part of data-lens\n\nUseful to work around the following:\n\nhttps://github.com/idris-lang/Idris-dev/issues/1356\n"
},
{
"from": "gpt",
"value": "module IR.Lens\n\nimport Control.Category\n\ndata Store s a = MkStore (s -> a) s\n\npos : Store s a -> s\npos... | idris | chosen |
[
{
"from": "human",
"value": "Add missing test file (sorry!)\n"
},
{
"from": "gpt",
"value": "import Data.Vect\n\ntotal\nvassoc : (xs : Vect n a) -> (ys : Vect m a) -> (zs : Vect p a) ->\n xs ++ (ys ++ zs) = (xs ++ ys) ++ zs\nvassoc [] ys zs = Refl\nvassoc (x :: xs) ys zs \n = rewrite ... | idris | chosen |
[
{
"from": "human",
"value": "Add `group` and `groupBy` to contrib\n"
},
{
"from": "gpt",
"value": "module Data.List.Group\n\n||| The groupBy function returns a list of lists such that the concatenation\n||| of the list is equal to the argument, and each sublist contains only\n||| elements that a... | idris | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.