code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Graphics.UI.Threepenny.Elements.ID where
import Graphics.UI.Threepenny.Attributes.Extra
import Graphics.UI.Threepenny.Extra
import Data.UUID
import Data.UUID.V4
newtype UID = UID
{ unUID :: String
} deriving (Eq,Ord,Show)
newID :: UI UID
newID = liftIO $ shortenUUID <$> nextRandom
shortenUUID :: UUID ->... | kylcarte/threepenny-extra | src/Graphics/UI/Threepenny/Elements/ID.hs | bsd-3-clause | 921 | 0 | 11 | 197 | 346 | 188 | 158 | 34 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Control.Applicative ((<**>), (<|>), optional)
import Data.Char (toLower)
import Data.Semigroup ((<>))
import System.IO (IOMode (WriteMode), stdout, openFile)
import Genotype.Comparison (PhaseKnowledge (..))
import Genotype.Processor (Processor, prepro... | Jonplussed/genotype-parser | app/Main.hs | bsd-3-clause | 4,008 | 0 | 14 | 760 | 1,100 | 579 | 521 | 115 | 4 |
{- It can be verified that there are 23 positive integers less than 1000 that are divisible by at least four distinct primes less than 100.
Find how many positive integers less than 10^16 are divisible by at least four distinct primes less than 100. -}
{-# LANGUAGE ScopedTypeVariables #-}
import qualified Zora.List ... | bgwines/project-euler | src/in progress/problem269.hs | bsd-3-clause | 1,042 | 2 | 11 | 171 | 231 | 143 | 88 | 29 | 1 |
module Yesod.Goodies.PNotify.Modules.Nonblock
( Nonblock(..)
, defaultNonblock
)where
import Data.Aeson
import Data.Text (Text)
import Yesod.Goodies.PNotify.Types
import Yesod.Goodies.PNotify.Types.Instances
data Nonblock = Nonblock { _nonblock :: Maybe Bool
, _... | cutsea110/yesod-pnotify | Yesod/Goodies/PNotify/Modules/Nonblock.hs | bsd-3-clause | 1,058 | 0 | 13 | 398 | 249 | 142 | 107 | -1 | -1 |
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE CPP #-}
{-|
This module defines a generic web application interface. It is a common
protocol between web servers and web applications.
The overriding design principles here are performance and generality. To
address performance, this library is built on top of the conduit and
... | sol/wai | wai/Network/Wai.hs | mit | 9,632 | 0 | 25 | 2,273 | 1,399 | 796 | 603 | 134 | 2 |
{-|
Low-Level Inferface for LMDB Event Log.
-}
module Urbit.Vere.LMDB where
import Urbit.Prelude hiding (init)
import Data.RAcquire
import Database.LMDB.Raw
import Foreign.Marshal.Alloc
import Foreign.Ptr
import Urbit.Vere.Pier.Types
import Foreign.Storable (peek, poke, sizeOf)
import qualified Data.ByteString... | jfranklin9000/urbit | pkg/hs/urbit-king/lib/Urbit/Vere/LMDB.hs | mit | 10,406 | 0 | 26 | 2,749 | 1,958 | 983 | 975 | -1 | -1 |
module Haskmon.Types.MetaData(
module Haskmon.Types.MetaData,
I.MetaData
) where
import Data.Time.Clock
import Haskmon.Types.Internals(MetaData)
import qualified Haskmon.Types.Internals as I
resourceUri :: MetaData -> String
resourceUri = I.resourceUri
created :: MetaData -> UTCTime
created = I.created
modifi... | bitemyapp/Haskmon | src/Haskmon/Types/MetaData.hs | mit | 368 | 0 | 5 | 50 | 95 | 59 | 36 | 12 | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="hu-HU">
<title>TLS Debug | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref l... | veggiespam/zap-extensions | addOns/tlsdebug/src/main/javahelp/org/zaproxy/zap/extension/tlsdebug/resources/help_hu_HU/helpset_hu_HU.hs | apache-2.0 | 971 | 80 | 66 | 160 | 415 | 210 | 205 | -1 | -1 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="da-DK">
<title>HTTPS Info | ZAP Add-on</title>
<maps>
<homeID>top</homeID>
<mapref loc... | veggiespam/zap-extensions | addOns/httpsInfo/src/main/javahelp/org/zaproxy/zap/extension/httpsinfo/resources/help_da_DK/helpset_da_DK.hs | apache-2.0 | 969 | 80 | 67 | 160 | 419 | 212 | 207 | -1 | -1 |
--------------------------------------------------------------------
-- |
-- Module : Flickr.Photos.Geo
-- Description : flickr.photos.geo - setting/getting photo geo location.
-- Copyright : (c) Sigbjorn Finne, 2008
-- License : BSD3
--
-- Maintainer : Sigbjorn Finne <sof@forkIO.com>
-- Stability : provi... | sof/flickr | Flickr/Photos/Geo.hs | bsd-3-clause | 4,894 | 22 | 12 | 1,134 | 821 | 463 | 358 | 68 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Pretty printing.
module HIndent.Pretty
(
-- * Printing
Pretty
, p... | ennocramer/hindent | src/HIndent/Pretty.hs | bsd-3-clause | 40,383 | 0 | 26 | 15,585 | 12,852 | 6,130 | 6,722 | 1,148 | 6 |
{-# LANGUAGE MagicHash,
UnboxedTuples,
ScopedTypeVariables #-}
module UU.Parsing.StateParser(StateParser(..)) where
import GHC.Prim
import UU.Parsing.MachineInterface
import UU.Parsing.Machine(AnaParser, ParsRec(..),RealParser(..),RealRecogn(..), mkPR, anaDynE)
instance (InputState inp s ... | UU-ComputerScience/uulib | src/UU/Parsing/StateParser.hs | bsd-3-clause | 1,343 | 0 | 15 | 409 | 561 | 305 | 256 | -1 | -1 |
module Syntax.Common
( module Syntax.Common
, module Text.Megaparsec
, module Syntax.ParseState
, module Syntax.Tree
) where
import Control.Monad (void)
import Control.Monad.Trans.Class (lift)
import Control.Monad.State.Lazy (put, get)
import qualified Text.Megaparsec.Lexer as L
import Text.Megaparsec hiding (State)
i... | BakerSmithA/Turing | src/Syntax/Common.hs | bsd-3-clause | 2,648 | 0 | 12 | 461 | 656 | 348 | 308 | 47 | 1 |
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
#endif
#if __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Trustworthy #-}
#endif
#include "containers.h"
-----------------------------------------------------------------------------
-- |
-- Module : Data.Tree
-- Copyr... | shockkolate/containers | Data/Tree.hs | bsd-3-clause | 5,981 | 0 | 14 | 1,329 | 1,804 | 967 | 837 | -1 | -1 |
module Control.Aufgabe.TH where
import Control.Aufgabe.Type
import Control.TH
import Network.XmlRpc.THDeriveXmlRpcType
$(asXmlRpcStruct ''Aufgabe)
| Erdwolf/autotool-bonn | src/Control/Aufgabe/TH.hs | gpl-2.0 | 149 | 0 | 8 | 13 | 36 | 21 | 15 | -1 | -1 |
-- | Render some text to HTML, replacing any URIs with actual links.
module Text.Blaze.Linkify where
import Data.Text (Text)
import Text.Blaze.Html5
import Text.Blaze.Html5.Attributes
import Text.Links
import Data.String.Extra
-- | Render some text to HTML, replacing any URIs with actual links.
linkify :: Text -> H... | plow-technologies/ircbrowse | src/Text/Blaze/Linkify.hs | bsd-3-clause | 516 | 0 | 13 | 86 | 137 | 75 | 62 | 11 | 2 |
yes = map (\(a,_) -> a) xs | mpickering/hlint-refactor | tests/examples/Default22.hs | bsd-3-clause | 26 | 0 | 8 | 6 | 25 | 14 | 11 | 1 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts #-}
-----------------------------------------------------------------------------
-- |
-- License : BSD-style (see the file LICENSE)
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : provisional
-- Portability : portable
--
... | bgamari/linear | src/Linear/Covector.hs | bsd-3-clause | 2,413 | 0 | 12 | 510 | 950 | 481 | 469 | 45 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
module Main where
import Control.Lens
import qualified Graphics.Vty as V
import qualified Brick.Main as M
import qualified Brick.Types as T
import Brick.Widgets.Core
( (<+>)
, (<=>)
, hLimit
, vLimit
, str
)
im... | sisirkoppaka/brick | programs/EditDemo.hs | bsd-3-clause | 2,609 | 0 | 19 | 694 | 816 | 442 | 374 | 75 | 3 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="sk-SK">
<title>Code Dx | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref loca... | thc202/zap-extensions | addOns/codedx/src/main/javahelp/org/zaproxy/zap/extension/codedx/resources/help_sk_SK/helpset_sk_SK.hs | apache-2.0 | 968 | 78 | 66 | 159 | 413 | 209 | 204 | -1 | -1 |
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE helpset
PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN"
"http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="en-GB">
<title>ViewState</title>
<maps>
<homeID>viewstate</homeID>
<mapref ... | thc202/zap-extensions | addOns/viewstate/src/main/javahelp/help/helpset.hs | apache-2.0 | 973 | 81 | 67 | 168 | 414 | 212 | 202 | -1 | -1 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Lens.Internal
-- Copyright : (C) 2012-15 Edward Kmett
-- License : BSD-style (see the file LICENSE)
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : experimental
-... | danidiaz/lens | src/Control/Lens/Internal.hs | bsd-3-clause | 1,676 | 0 | 5 | 200 | 217 | 163 | 54 | 27 | 0 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP
, ForeignFunctionInterface
, MagicHash
, UnboxedTuples
, ScopedTypeVariables
#-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}
-- kludge for the Control.Concurrent.QSem, Control.Concurre... | beni55/haste-compiler | libraries/ghc-7.8/base/Control/Concurrent.hs | bsd-3-clause | 24,702 | 0 | 24 | 6,089 | 2,167 | 1,178 | 989 | 91 | 3 |
module SPARC.CodeGen.Amode (
getAmode
)
where
import {-# SOURCE #-} SPARC.CodeGen.Gen32
import SPARC.CodeGen.Base
import SPARC.AddrMode
import SPARC.Imm
import SPARC.Instr
import SPARC.Regs
import SPARC.Base
import NCGMonad
import Size
import Cmm
import OrdList
-- | Generate code to reference a memory add... | forked-upstream-packages-for-ghcjs/ghc | compiler/nativeGen/SPARC/CodeGen/Amode.hs | bsd-3-clause | 1,625 | 0 | 16 | 487 | 607 | 301 | 306 | 54 | 1 |
module Main where
main = print (fib' 100)
-- This will time out unless memoing works properly
data Nat = Z | S Nat
deriving (Show, Eq)
memo f = g
where
fz = f Z
fs = memo (f . S)
g Z = fz
g (S n) = fs n
-- It is a BAD BUG to inline 'fs' inside g
-- and that ha... | ezyang/ghc | testsuite/tests/simplCore/should_run/simplrun005.hs | bsd-3-clause | 1,232 | 0 | 11 | 592 | 415 | 207 | 208 | 31 | 3 |
import Control.Monad
import Data.Word (Word8)
import Foreign.Ptr
import Foreign.Marshal.Array
import GHC.Foreign (peekCStringLen, withCStringLen)
import GHC.IO.Encoding.Failure (CodingFailureMode(..))
import qualified GHC.IO.Encoding.Latin1 as Latin1
import System.IO
import System.IO.Error
-- Tests for single-byte enc... | ezyang/ghc | libraries/base/tests/IO/encoding005.hs | bsd-3-clause | 5,035 | 0 | 15 | 818 | 1,244 | 622 | 622 | 76 | 8 |
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
{-# LANGUAGE FlexibleInstances, IncoherentInstances, PatternGuards #-}
module Idris.IdeMode(parseMessage, convSExp, WhatDocs(..), IdeModeCommand(..), sexpToCommand, toSExp, SExp(..), SExpable, Opt(..), ideModeEpoch, getLen, getNChar, sExpToString) where
import Text.Prin... | ExNexu/Idris-dev | src/Idris/IdeMode.hs | bsd-3-clause | 16,974 | 0 | 16 | 5,044 | 5,500 | 2,816 | 2,684 | 276 | 3 |
{-# LANGUAGE TypeFamilies #-}
module Main where
data A a
type T a = A a
f :: (A a ~ T Int) => a -> Int
f x = x
main :: IO ()
main = return () | siddhanathan/ghc | testsuite/tests/typecheck/should_compile/GivenTypeSynonym.hs | bsd-3-clause | 163 | 0 | 8 | 60 | 73 | 40 | 33 | -1 | -1 |
import Control.Concurrent
import Control.Monad
import Control.Exception
import System.Mem
-- caused an assertion failure with -debug in 7.0.1 (#4813)
main = do
m <- newEmptyMVar
ts <- replicateM 100 $ mask_ $ forkIO $ threadDelay 100000; putMVar m ()
mapM_ killThread (reverse (init ts))
takeMVar m
| urbanslug/ghc | testsuite/tests/concurrent/should_run/T4813.hs | bsd-3-clause | 313 | 0 | 11 | 59 | 96 | 46 | 50 | 9 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
-- | Kern... | HIPERFIT/futhark | src/Futhark/Pass/ExtractKernels.hs | isc | 32,554 | 0 | 25 | 8,664 | 8,456 | 4,261 | 4,195 | -1 | -1 |
-- Copyright 2015-2016 Yury Gribov
--
-- Use of this source code is governed by MIT license that can be
-- found in the LICENSE.txt file.
module Support where
import qualified System.Environment
import qualified System.Exit
import qualified Data.Array
import Debug.Trace (trace)
-- Create Data.Array.Array with all e... | yugr/sudoku | src/Support.hs | mit | 2,176 | 0 | 12 | 448 | 718 | 383 | 335 | 47 | 3 |
module Philed.Data.List (module Data.List
,module Philed.Data.ListExtras) where
import Data.List
import Philed.Data.ListExtras
| Chattered/PhilEdCommon | Philed/Data/List.hs | mit | 152 | 0 | 5 | 36 | 33 | 22 | 11 | 4 | 0 |
{-# LANGUAGE TemplateHaskell, FlexibleContexts #-}
module Kachushi.KState
(
KState (..)
, boards
, deck
, initialState
, putCard
, putCards
) where
import Kachushi.Cards (Card (..), fullDeck)
import Kachushi.OFCP (Board (..), emptyBoard, Slot (..), Row (..))
import Control.Lens (over, makeLenses, eleme... | ScrambledEggsOnToast/Kachushi | Kachushi/KState.hs | mit | 2,114 | 0 | 19 | 584 | 766 | 421 | 345 | 45 | 1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.HTMLLegendElement (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.HTMLLegendElement
#else
module Graphics.UI.Gtk.WebKit.DOM.HTMLLegendElement
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASC... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/HTMLLegendElement.hs | mit | 470 | 0 | 5 | 39 | 33 | 26 | 7 | 4 | 0 |
{-# LANGUAGE RecordWildCards #-}
module Lambency.Camera (
mkOrthoCamera,
mkPerspCamera,
getViewProjMatrix,
getCamXForm,
setCamXForm,
getCamDist,
setCamDist,
getCamPos,
setCamPos,
getCamDir,
setCamDir,
getCamUp,
setCamUp,
getCamNear,
setCamNear,
getCamFar,
setCamFar,
camLookAt,
m... | Mokosha/Lambency | lib/Lambency/Camera.hs | mit | 9,911 | 4 | 20 | 2,720 | 3,558 | 1,888 | 1,670 | 243 | 3 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE U... | Javran/misc | alex-playground/src/Lib.hs | mit | 2,729 | 0 | 12 | 587 | 613 | 326 | 287 | -1 | -1 |
module Network.WebSockets.Messaging
( Connection(disconnected)
, request
, requestAsync
, notify
, onRequest
, onNotify
, onConnect
, onDisconnect
, startListening
, Request(..)
, Notify(..)
, Some(..)
, deriveRequest
, deriveNotify
, Future
, get
, f... | leonidas/ws-messaging | src/Network/WebSockets/Messaging.hs | mit | 732 | 0 | 5 | 153 | 140 | 91 | 49 | 30 | 1 |
module Rebase.Data.Vector.Storable.Mutable
(
module Data.Vector.Storable.Mutable
)
where
import Data.Vector.Storable.Mutable
| nikita-volkov/rebase | library/Rebase/Data/Vector/Storable/Mutable.hs | mit | 128 | 0 | 5 | 12 | 26 | 19 | 7 | 4 | 0 |
import Geometry
import Drawing
main = drawPicture myPicture
myPicture points = undefined
| alphalambda/k12math | contrib/MHills/GeometryLessons/code/student/lesson2e.hs | mit | 98 | 0 | 5 | 21 | 23 | 12 | 11 | 4 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
-- | Warning: This module should be considered highly experimental.
module Data.Containers where
import qualified Data.Map as Map
import qualified Data.HashMap.Strict as HashMap
import Data.Hashable (Hashable)
import qua... | moonKimura/mono-traversable-0.1.0.0 | src/Data/Containers.hs | mit | 5,148 | 0 | 11 | 1,113 | 1,661 | 909 | 752 | 135 | 0 |
module FSM (
FSM(..),
mapTransitions,
mapToFunc,
accepts
) where
import State (Token(..), State(..), TransitionFunction(..), Transition(..), TransitionMap)
import Data.Set as Set (Set, elems, member)
import Data.Map as Map (Map, (!), empty, insert, singleton, member)
data FSM = FSM {states :: Set State, state0 ::... | wyager/NDFSMtoFSM | FSM.hs | mit | 1,310 | 14 | 14 | 244 | 534 | 298 | 236 | 25 | 2 |
class Functor f where
fmap :: (a -> b) -> f a -> f b
--haskell中的functor是一个kind为* -> *的typeclass也就是说在要instance这个typeclass的时候必须是一个类型构造器也就是获取一个类型返回一个新类型的data 比如Maybe
instance Functor Maybe where
fmap f (Just x) = Just (f x)
fmap f Nothing = Nothing
--对于list来说 fmap的类型是
fmap :: (a -> b) -> [a] -> [b]
--而一般lis... | zjhmale/monadme | monad/src/monad/haskell/functor.hs | epl-1.0 | 642 | 1 | 9 | 101 | 170 | 88 | 82 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE CPP, FlexibleInstances, StandaloneDeriving, DeriveGeneric #-}
{-# OPTIONS -fno-warn-orphans #-}
module Lib.TimeInstances () where
import Prelude.Compat
import Data.Binary(Binary(..))
import Data.Time.Clock (NominalDiffTime, DiffTime)
import Data.Fixed (Pico, Fixed(..), ... | sinelaw/buildsome | src/Lib/TimeInstances.hs | gpl-2.0 | 1,110 | 0 | 7 | 203 | 248 | 149 | 99 | 35 | 1 |
--------------------------------------------------------------------------------
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE LambdaCase #-}
module Text.Pandoc.Extended
( module Text.Pandoc
, plainToPara
, newlineToSpace
) where
------------------------------------------------------------------------... | jaspervdj/patat | lib/Text/Pandoc/Extended.hs | gpl-2.0 | 854 | 0 | 9 | 153 | 134 | 79 | 55 | 18 | 3 |
{-
Functional parsing library from chapter 8 of Programming in Haskell,
Graham Hutton, Cambridge University Press, 2007.
Minor changes by Edwin Brady
-}
module Parsing where
import Data.Char
import Control.Monad
import Lit
infixr 5 |||
{-
The monad of parsers
--------------------
-}
newtype Parser a ... | MaximKN/Haskell1 | src/Parsing.hs | gpl-3.0 | 6,028 | 16 | 18 | 3,579 | 1,349 | 672 | 677 | 112 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Agents/Webhooks/Create.hs | mpl-2.0 | 5,950 | 0 | 17 | 1,274 | 785 | 459 | 326 | 121 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Subnetworks/AggregatedList.hs | mpl-2.0 | 6,836 | 0 | 18 | 1,474 | 676 | 407 | 269 | 97 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/TargetSSLProxies/SetProxyHeader.hs | mpl-2.0 | 5,479 | 0 | 18 | 1,191 | 561 | 335 | 226 | 94 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-apps-tasks/gen/Network/Google/Resource/Tasks/TaskLists/Update.hs | mpl-2.0 | 4,907 | 0 | 20 | 1,236 | 790 | 459 | 331 | 116 | 1 |
module GameSettings where
import Data.Default
data GenMoveType = Simple | WithTime Int | WithComplexity Int
deriving (Eq, Show, Read)
instance Default GenMoveType where
def = Simple
data BeginPattern = Empty | Cross | TwoCrosses | TripleCross
deriving (Eq, Show, Read)
instance Default BeginPattern where
de... | kurnevsky/missile | src/GameSettings.hs | agpl-3.0 | 1,041 | 0 | 9 | 451 | 200 | 119 | 81 | 23 | 0 |
-- eidolon -- A simple gallery in Haskell and Yesod
-- Copyright (C) 2015 Amedeo Molnár
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as published
-- by the Free Software Foundation, either version 3 of the License, or
-- ... | Mic92/eidolon | Handler/Upload.hs | agpl-3.0 | 11,945 | 0 | 50 | 4,172 | 3,077 | 1,490 | 1,587 | 256 | 8 |
{-
Created : 2013 Dec 01 (Sun) 08:57:06 by carr.
Last Modified : 2013 Dec 01 (Sun) 09:45:26 by carr.
http://en.wikibooks.org/wiki/Haskell/Monad_transformers
-}
import Data.Char
import Data.Maybe
------------------------------------------------------------------------------
-- non-monadic
askPassword :: IO ()
... | haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/monads/Wikibooks_haskell_monad_transformers.hs | unlicense | 3,517 | 0 | 9 | 948 | 306 | 150 | 156 | 28 | 2 |
module Network.Haskoin.Wallet.Model
( -- Database types
Account(..)
, AccountId
, WalletAddr(..)
, WalletAddrId
, WalletState(..)
, WalletStateId
, WalletCoin(..)
, WalletCoinId
, SpentCoin(..)
, SpentCoinId
, WalletTx(..)
, WalletTxId
, EntityField(..)
, Unique(..)
, migrateWallet
-- JSON conversion
, toJsonAccount... | plaprade/haskoin | haskoin-wallet/src/Network/Haskoin/Wallet/Model.hs | unlicense | 4,083 | 0 | 14 | 1,151 | 871 | 500 | 371 | -1 | -1 |
-- Copyright 2013 Matthew Spellings
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
-- http://www.apache.org/licenses/LICENSE-2.0
-- Unless required by applicable law or agreed to in wr... | klarh/hasdy | test/test.hs | apache-2.0 | 6,548 | 0 | 17 | 1,177 | 1,951 | 1,071 | 880 | 100 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module View.Index (render) where
import Control.Monad (forM_)
import Model.Definition
import Text.Blaze.Html5.Attributes (href, class_)
import Text.Blaze.Html.Renderer.Text
import Data.Monoid((<>))
import View.Header
import qualified Data.Text.Lazy as D
import qualified Text.Blaze.H... | codemiller/fp-in-the-cloud | src/View/Index.hs | apache-2.0 | 3,131 | 0 | 23 | 446 | 337 | 187 | 150 | 23 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
-- * Demonstrating `non-compositional', context-sensitive processing
-- * The final style
-- * Flatten the additions
module FlatF where
import Intro2 hiding (main)
import PushNegF as Neg hiding (main,Ctx)
-- We are going to write flata as... | mjhopkins/ttfi | src/haskell/FlatF.hs | apache-2.0 | 4,020 | 8 | 12 | 903 | 621 | 337 | 284 | 44 | 5 |
{-# Language RecordWildCards #-}
-- |
-- Module : GRN.Sparse
-- Copyright : (c) 2011 Jason Knight
-- License : BSD3
--
-- Maintainer : jason@jasonknight.us
-- Stability : experimental
-- Portability : portable
--
-- Provides sparse matrix capabilities for an attempt at speeding up the
-- simulation of the Mark... | binarybana/grn-pathways | GRN/Sparse.hs | bsd-2-clause | 6,308 | 0 | 20 | 1,575 | 2,203 | 1,168 | 1,035 | 127 | 2 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QTextLength.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:35
Warning : this file is machine generated - do n... | uduki/hsQt | Qtc/Enums/Gui/QTextLength.hs | bsd-2-clause | 2,552 | 0 | 18 | 530 | 606 | 309 | 297 | 54 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOp... | ocharles/opaleye-tf | src/Opaleye/TF/BaseTypes.hs | bsd-3-clause | 5,425 | 0 | 9 | 1,443 | 1,332 | 765 | 567 | 124 | 1 |
module Main where
import Test.Framework (defaultMain)
import Circular.Syntax.Concrete.Tests
main = defaultMain Main.tests
tests =
[ Circular.Syntax.Concrete.Tests.tests
]
| Toxaris/circular | src/tests.hs | bsd-3-clause | 189 | 0 | 6 | 35 | 44 | 28 | 16 | 6 | 1 |
------------------------------------------------------------------------------
-- |
-- Module : Data.TokyoDystopia.IDB
-- Copyright : 8c6794b6 <8c6794b6@gmail.com>
-- License : BSD3
-- Maintainer : 8c6794b6
-- Stability : experimental
-- Portability : non-portable
--
-- Haskell binding for tokyodystopia T... | 8c6794b6/tokyodystopia-haskell | Database/TokyoDystopia/IDB.hs | bsd-3-clause | 6,697 | 0 | 16 | 1,636 | 1,868 | 1,012 | 856 | 146 | 7 |
{-# LANGUAGE ForeignFunctionInterface #-}
-------------------------------------------------------------------------------
-- |
-- Copyright : (c) 2015 Michael Carpenter
-- License : BSD3
-- Maintainer : Michael Carpenter <oldmanmike.dev@gmail.com>
-- Stability : experimental
-- Portability : portable
--
-... | oldmanmike/CsoundRaw | src/Sound/Csound/Debugger.hs | bsd-3-clause | 2,460 | 0 | 8 | 291 | 417 | 222 | 195 | 26 | 1 |
module Main ( main ) where
import Control.DeepSeq
import Control.Exception
import qualified Data.Map as Map
import qualified Data.Set as Set
import Distribution.Nixpkgs.Haskell.FromCabal.Configuration.GHC7102
import Distribution.Nixpkgs.License
import Distribution.Nixpkgs.Meta
import Internal.Lens
import Test.Hspec
m... | psibi/cabal2nix | test/spec.hs | bsd-3-clause | 1,231 | 0 | 19 | 341 | 304 | 163 | 141 | 27 | 1 |
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.DeepSeq(module Idris.DeepSeq, module Idris.Core.DeepSeq) where
import Idris.Core.DeepSeq
import Idris.Docstrings
import Idris.Core.TT
import Idris.AbsSyntaxTree
import Control.DeepSeq
import qualified Cheapskate.Types as CT
import qualified Idris.Docstring... | bkoropoff/Idris-dev | src/Idris/DeepSeq.hs | bsd-3-clause | 14,948 | 0 | 18 | 5,606 | 7,609 | 4,018 | 3,591 | 343 | 0 |
module Main(main) where
import MonadPoint
--
titlePage title name =
scale 0.9 $ do
scaleh 0.65 $ do
scalehu 0.7 $ do
holstack $ mapM_ txtc $ lines title
scalehd 0.2 $ do
txtc name
tmpl title m =
page $ do
scale 0.9 $ do
scalehu 0.2 $ do
txtc ti... | tanakh/MonadPoint | test/Main.hs | bsd-3-clause | 868 | 0 | 17 | 334 | 278 | 120 | 158 | 36 | 1 |
{-|
Copyright : (c) Dave Laing, 2017
License : BSD3
Maintainer : dave.laing.80@gmail.com
Stability : experimental
Portability : non-portable
-}
module Fragment.Fix.Helpers (
tmFix
) where
import Control.Lens (review)
import Ast.Term
import Fragment.Fix.Ast.Term
tmFix :: AsTmFix ki ty pt tm
=> T... | dalaing/type-systems | src/Fragment/Fix/Helpers.hs | bsd-3-clause | 388 | 0 | 7 | 89 | 87 | 48 | 39 | 9 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- |
-- Module: $HEADER$
-- Description: Abstract API for DHT implementations.
-- Copyright: (c) 2015, Jan Šipr, Matej Kollár, Peter Trško
-- License: BSD3
--
-- Stability: experimental
-- Portability: NoImplicitPrelude
--
-- Abs... | FPBrno/dht-api | src/Data/DHT/Core.hs | bsd-3-clause | 1,861 | 0 | 10 | 401 | 409 | 239 | 170 | 36 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
module ZM.Type.Float32(IEEE_754_binary32(..)) where
import Data.Model
import ZM.Type.Bits8
import ZM.Type.Bits23
import ZM.Type.Words
-- |An IEEE-754 Big Endian 32 bits Float
data IEEE_754_binary32 =
IEEE_75... | tittoassini/typed | src/ZM/Type/Float32.hs | bsd-3-clause | 811 | 0 | 9 | 228 | 106 | 68 | 38 | 13 | 0 |
module Atomo.Parser.Expr where
import Control.Arrow (first, second)
import Control.Monad.State
import Data.Maybe (fromJust, isJust)
import Text.Parsec
import qualified Control.Monad.Trans as MTL
import Atomo.Environment
import Atomo.Helpers (toPattern', toMacroPattern')
import Atomo.Parser.Base
import Atomo.Parser.Ex... | Mathnerd314/atomo | src/Atomo/Parser/Expr.hs | bsd-3-clause | 11,644 | 0 | 19 | 3,375 | 3,409 | 1,704 | 1,705 | 280 | 7 |
-- | Mutually recursive types.
module Data.Aeson.Validation.Internal.Types where
import Data.Aeson.Validation.Internal.Prelude
import Data.List.NonEmpty ((<|))
import qualified GHC.Exts as GHC
-- $setup
-- >>> import Data.Aeson.Validation.Internal.Schema
data Demand
= Opt
| Req
deriving Eq
instance Hashab... | mitchellwrosen/json-validation | src/internal/Data/Aeson/Validation/Internal/Types.hs | bsd-3-clause | 4,349 | 0 | 9 | 1,042 | 640 | 387 | 253 | 107 | 0 |
module AddressUtils
( adjustAddr
, adjustAmount
, IsBitcoinAddress
) where
import qualified Data.Text as T
import qualified Network.BitcoinRPC as RPC
import qualified Network.MtGoxAPI as MtGox
class IsBitcoinAddress a where
addrToText :: a -> T.Text
textToAddr :: T.Text -> a
instance IsBitco... | javgh/bridgewalker | src/AddressUtils.hs | bsd-3-clause | 1,340 | 0 | 8 | 251 | 305 | 171 | 134 | 35 | 1 |
{-# LANGUAGE CPP #-}
-- This module deliberately defines orphan instances for now (Binary Version).
{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-name-shadowing #-}
-----------------------------------------------------------------------------
-- |
-- Module : ETA.PackageDb
-- Copyright : (c) The University of Gl... | alexander-at-github/eta | utils/eta-pkgdb/ETA/PackageDb.hs | bsd-3-clause | 15,693 | 0 | 19 | 4,345 | 2,821 | 1,504 | 1,317 | 284 | 4 |
{-# OPTIONS_GHC -Wall #-}
module Atmosphere.Atmosphere( siAtmosphere
, usAtmosphere
) where
-- 1976 US Standard Atmosphere
-- Adapted by
-- Greg Horn
-- Adapted by
-- Richard J. Kwan, Lightsaber Computing
-- from original programs by
-- Ralph L... | ghorn/conceptual-design | Atmosphere/Atmosphere.hs | bsd-3-clause | 3,780 | 0 | 15 | 984 | 922 | 527 | 395 | 56 | 1 |
{-# LANGUAGE
DataKinds
, FlexibleContexts
, LambdaCase
, TupleSections #-}
module Language.HM.Rename
( NameError (..)
, rename
) where
import Control.Applicative
import Control.Category
import Control.Comonad.Cofree
import Control.Monad.Error.Class
import Control.Monad.Name.Class
import ... | sonyandy/unify | examples/unify-hm/Language/HM/Rename.hs | bsd-3-clause | 2,058 | 0 | 17 | 555 | 737 | 389 | 348 | 64 | 5 |
{- |
Copyright : Copyright (C) 2011 Bjorn Buckwalter
License : BSD3
Maintainer : bjorn.buckwalter@gmail.com
Stability : Stable
Portability: Haskell 98
This purpose of this library is to have a simple API and no
dependencies beyond Haskell 98 in order to let you produce normally
distributed random ... | bjornbm/normaldistribution | Data/Random/Normal.hs | bsd-3-clause | 5,529 | 0 | 10 | 1,119 | 924 | 523 | 401 | 43 | 1 |
--file: Main.hs
module AnsiExample where
import Prelude hiding (Either(..))
import System.Console.ANSI
import System.IO
type Coord = (Int, Int)
data World = World { wHero :: Coord }
data Input = Up
| Down
| Left
| Right
| Exit
deriving (Eq)
anotherMain = do
... | JobaerChowdhury/game-of-life | app/AnsiExample.hs | bsd-3-clause | 2,040 | 0 | 10 | 569 | 605 | 316 | 289 | 59 | 6 |
module Handler.Board where
import Import
import qualified Data.Text as T
import qualified Data.List.Split as S
import Board
import NeuralNets
import CommonDatatypes
getBoardR :: Text -> Handler RepHtml
getBoardR boardRepr = do
ag'white <- liftIO $ mkAgent White
ag'black <- liftIO $ mkAgent Black
let denseRepr... | Tener/deeplearning-thesis | yesod/abaloney/Handler/Board.hs | bsd-3-clause | 859 | 0 | 14 | 187 | 218 | 114 | 104 | 20 | 2 |
-- | Provides a set implementation for machine CSP sets. This relies heavily
-- on the type checking and assumes in many places that the sets being operated
-- on are suitable for the opertion in question.
--
-- We cannot just use the built in set implementation as FDR assumes in several
-- places that infinite sets ar... | sashabu/libcspm | src/CSPM/Evaluator/ValueSet.hs | bsd-3-clause | 19,163 | 0 | 17 | 4,019 | 6,426 | 3,256 | 3,170 | 348 | 10 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances, TypeOperators, ScopedTypeVariables, NamedFieldPuns #-}
{-# LANGUAGE GADTs, GeneralizedNewtypeDeriving, DeriveDataTypeable, RecordWildCards #-}
-- | This module provides functions for calling command line programs, primarily
-- ... | ndmitchell/shake | src/Development/Shake/Command.hs | bsd-3-clause | 35,626 | 0 | 26 | 8,400 | 8,964 | 4,734 | 4,230 | -1 | -1 |
{-# LINE 1 "Control.Concurrent.hs" #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP
, MagicHash
, UnboxedTuples
, ScopedTypeVariables
, RankNTypes
#-}
{-# OPTIONS_GHC -Wno-deprecations #-}
-- kludge for the Control.Concurrent.QSem,... | phischu/fragnix | builtins/base/Control.Concurrent.hs | bsd-3-clause | 21,926 | 0 | 21 | 4,993 | 1,300 | 723 | 577 | 133 | 3 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAG... | FranklinChen/music-score | src/Music/Score/Meta/Key.hs | bsd-3-clause | 3,917 | 0 | 11 | 1,212 | 920 | 541 | 379 | 83 | 1 |
{-# LANGUAGE LambdaCase #-}
{-|
Module : Lib
Description : Lib's main module
This is a haddock comment describing your library
For more information on how to write Haddock comments check the user guide:
<https://www.haskell.org/haddock/doc/html/index.html>
-}
module Lib
( slaskellbot
) where
import ... | wamaral/slaskellbot | src/Lib.hs | bsd-3-clause | 2,995 | 0 | 18 | 766 | 844 | 422 | 422 | 65 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANG... | HalfWayMan/meadowstalk | src/Meadowstalk/Foundation.hs | bsd-3-clause | 2,117 | 0 | 14 | 363 | 309 | 160 | 149 | 45 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Deviser.Parser
( readExpr
, readExprFile
) where
import Data.Array (listArray)
import Data.Complex
import Data.Functor.Identity (Identity)
import Data.Ratio ((%))
import qualified Data.Text as T
import Numeric (readFloat, readHex, readOct)
import Text.Parsec hiding (spa... | henrytill/deviser | src/Deviser/Parser.hs | bsd-3-clause | 5,903 | 0 | 16 | 1,270 | 2,092 | 1,048 | 1,044 | 178 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module TW.CodeGen.PureScript
( makeFileName, makeModule
, libraryInfo
)
where
import TW.Ast
import TW.BuiltIn
import TW.JsonRepr
import TW.Types
import TW.Utils
import Data.Maybe
import Data.Monoid
import System.FilePath
import qualif... | agrafix/typed-wire | src/TW/CodeGen/PureScript.hs | mit | 12,260 | 0 | 22 | 4,012 | 3,955 | 1,963 | 1,992 | 264 | 6 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Bead.Config.Parser where
import Control.Applicative
import Data.ByteString.Char8 (pack)
import Data.Maybe
import Data.String
import Data.Yaml
import Bead.Config.Configuration
#ifdef TEST
import Test.Tasty.TestSet
#endif
-- * JSON instances
instance Fr... | andorp/bead | src/Bead/Config/Parser.hs | bsd-3-clause | 5,778 | 0 | 25 | 1,532 | 928 | 513 | 415 | 27 | 1 |
module ShowRepoEvents where
import qualified Github.Issues.Events as Github
import Data.List (intercalate)
import Data.Maybe (fromJust)
main = do
possibleEvents <- Github.eventsForRepo "thoughtbot" "paperclip"
case possibleEvents of
(Left error) -> putStrLn $ "Error: " ++ show error
(Right events) -... | jwiegley/github | samples/Issues/Events/ShowRepoEvents.hs | bsd-3-clause | 1,777 | 0 | 14 | 352 | 487 | 241 | 246 | 36 | 8 |
module Opaleye.Column (module Opaleye.Column,
Column,
Nullable,
unsafeCoerce,
unsafeCoerceColumn,
unsafeCompositeField) where
import Opaleye.Internal.Column (Column, Nullable, unsafeCoerce, uns... | benkolera/haskell-opaleye | src/Opaleye/Column.hs | bsd-3-clause | 2,189 | 0 | 12 | 543 | 449 | 244 | 205 | 30 | 1 |
-- |
-- Module: Network.FastIRC.ServerSet
-- Copyright: (c) 2010 Ertugrul Soeylemez
-- License: BSD3
-- Maintainer: Ertugrul Soeylemez <es@ertes.de>
-- Stability: alpha
--
-- Functions for dealing with sets of IRC servers. Note that servers
-- are compared case-insensitively.
module Network.FastIRC.ServerSet... | chrisdone/hulk | fastirc-0.2.0/Network/FastIRC/ServerSet.hs | bsd-3-clause | 1,603 | 0 | 9 | 305 | 309 | 179 | 130 | 26 | 1 |
-- This is a modification of the calendar program described in section 4.5
-- of Bird and Wadler's ``Introduction to functional programming'', with
-- two ways of printing the calendar ... as in B+W, or like UNIX `cal':
-- Run using: calFor "1996"
-- or: putStr (calendar 1996)
-- or: putStr (cal 1996)... | OS2World/DEV-UTIL-HUGS | demos/Calendar.hs | bsd-3-clause | 4,964 | 5 | 14 | 1,957 | 1,556 | 854 | 702 | 87 | 2 |
module C3 (module D, module C3) where
import D3 as D hiding (anotherFun)
anotherFun (x:xs) = sq x + anotherFun xs
anotherFun [] = 0
| RefactoringTools/HaRe | old/testing/duplication/C3_TokOut.hs | bsd-3-clause | 144 | 0 | 7 | 37 | 60 | 35 | 25 | 4 | 1 |
{-# LANGUAGE GADTs, TypeOperators, PolyKinds #-}
module T16074 where
import GHC.Types
data a :~: b where Refl :: a :~: a
foo :: TYPE a :~: TYPE b
foo = Refl
| sdiehl/ghc | testsuite/tests/typecheck/should_fail/T16074.hs | bsd-3-clause | 161 | 0 | 6 | 35 | 46 | 27 | 19 | 6 | 1 |
module RecNat where
{- imports will be added for the PointlessP librasies -}
recNat :: Int -> (Int -> a -> a) -> a -> a
recNat 0 f z = z
recNat n f z = f (n-1) (recNat (n-1) f z)
--Programatica parser can't read:
-- recNat (n+1) f z = f n (recNat n f z)
-- the whole expression will be selected for tran... | kmate/HaRe | old/testing/pointwiseToPointfree/RecNat.hs | bsd-3-clause | 511 | 0 | 11 | 124 | 127 | 70 | 57 | 5 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash, UnboxedTuples #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Word
-- Copyright : (c) The University of Glasgow, 1997-2002
-- License ... | beni55/haste-compiler | libraries/ghc-7.8/base/GHC/Word.hs | bsd-3-clause | 26,222 | 0 | 15 | 8,340 | 7,088 | 3,689 | 3,399 | 457 | 1 |
-- | Functionality common to all repo kinds
module Distribution.Client.Mirror.Repo.Util (
readIndex
, provideAuthInfo
) where
-- stdlib
import Control.Exception
import Control.Monad
import Data.Time
import Data.Time.Clock.POSIX
import Network.URI hiding (authority)
import System.FilePath
import System.IO
impor... | ocharles/hackage-server | Distribution/Client/Mirror/Repo/Util.hs | bsd-3-clause | 2,747 | 0 | 14 | 619 | 719 | 392 | 327 | 62 | 5 |
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-}
-------------------------------------------------------------------------------
--
-- | Break Arrays in the IO monad
--
-- Entries in the array are Word sized Conceptually, a zero-indexed IOArray of
-- Bools, initially False. They're represented as Words with 0==False, 1... | urbanslug/ghc | compiler/main/BreakArray.hs | bsd-3-clause | 3,723 | 0 | 20 | 901 | 987 | 495 | 492 | 9 | 1 |
{-# OPTIONS_GHC -fno-package-trust #-}
-- | Basic test to see if Safe flags compiles
-- test should fail as there shouldn't be a no-package-trust flag, only a
-- package-trust flag!
module SafeFlags19 where
f :: Int
f = 1
| sdiehl/ghc | testsuite/tests/safeHaskell/flags/SafeFlags19.hs | bsd-3-clause | 224 | 0 | 4 | 41 | 18 | 13 | 5 | 4 | 1 |
-- | Multicore code generation for 'SegMap'.
module Futhark.CodeGen.ImpGen.Multicore.SegMap
( compileSegMap,
)
where
import Control.Monad
import qualified Futhark.CodeGen.ImpCode.Multicore as Imp
import Futhark.CodeGen.ImpGen
import Futhark.CodeGen.ImpGen.Multicore.Base
import Futhark.IR.MCMem
import Futhark.Trans... | HIPERFIT/futhark | src/Futhark/CodeGen/ImpGen/Multicore/SegMap.hs | isc | 1,876 | 0 | 16 | 367 | 642 | 317 | 325 | 51 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Homework.Week11.Assignment where
import Control.Monad.Random
------------------------------------------------------------
-- Die values
newtype DieValue = DV { unDV :: Int }
deriving (Eq, Ord, Show, Num)
first :: (a -> b) -> (a, c) -> (b, c)
first f (a, c) = (f... | jxv/cis-194-winter-2016 | src/Homework/Week11/Assignment.hs | mit | 1,030 | 0 | 11 | 182 | 305 | 174 | 131 | 22 | 1 |
module Main where
import Dom
import HTML.Parsec
import HTML.Parser
import CSS
--this is just here so cabal has a main to compile
main :: IO ()
main = print "This doesn't do anything yet" | Hrothen/Hubert | src/Main.hs | mit | 188 | 0 | 6 | 35 | 39 | 23 | 16 | 7 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.