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 : Codec.MIME.Base64
-- Copyright : (c) 2006-2009, Galois, Inc.
-- License : BSD3
--
-- Maintainer: Sigbjorn Finne <sigbjorn.finne@gmail.com>
-- Stability : provisional
-- Portability: portable
--
--
-- Base64 decoding and encodin... | GaloisInc/mime | Codec/MIME/Base64.hs | bsd-3-clause | 4,735 | 0 | 14 | 1,202 | 1,656 | 857 | 799 | 98 | 4 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ParallelListComp #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
-- | The adaptive radix tree contains four different types of internal
-- nodes, depending on how many children they store:
--
-- * 1–4 children are stored as an array of up ... | TikhonJelvis/adaptive-radix-trees | src/Data/ART/Children.hs | bsd-3-clause | 7,842 | 0 | 14 | 2,066 | 1,974 | 1,048 | 926 | -1 | -1 |
module Fun.Direct where
import qualified Fun.Direct.Config as D
import qualified Fun.Quiz.Type2 as T2
import qualified Fun.Quiz.Type as T
import Fun.Type
import Fun.Table
import Fun.Examples
import Fun.Check
import Fun.Create
import qualified RAM.Builtin
import Inter.Types
import Inter.Quiz
import Challenger.Parti... | florianpilz/autotool | src/Fun/Direct.hs | gpl-2.0 | 2,762 | 53 | 14 | 888 | 494 | 317 | 177 | -1 | -1 |
{-
Copyright 2013 Google Inc. All Rights Reserved.
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 ... | mzero/plush | src/Plush/Run/Expansion/Types.hs | apache-2.0 | 4,287 | 0 | 13 | 828 | 715 | 401 | 314 | 50 | 1 |
import Test.Framework (defaultMain)
import qualified Tests.Distribution as Distribution
import qualified Tests.Function as Function
import qualified Tests.KDE as KDE
import qualified Tests.Matrix as Matrix
import qualified Tests.NonParametric as NonParametric
import qualified Tests.Transform as Transform
import qualifi... | fpco/statistics | tests/tests.hs | bsd-2-clause | 650 | 0 | 7 | 194 | 120 | 78 | 42 | 16 | 1 |
{-# OPTIONS -fglasgow-exts #-}
--
-- polymorphic eval!
--
module Main where
import Poly
import System.Eval.Haskell
main = do m_f <- eval "Fn (\\x y -> x == y)" ["Poly"]
when (isJust m_f) $ do
let (Fn f) = fromJust m_f
putStrLn $ show (f True True)
putStrLn $ ... | abuiles/turbinado-blog | tmp/dependencies/hs-plugins-1.3.1/testsuite/eval/eval_fn1/Main.hs | bsd-3-clause | 333 | 0 | 14 | 114 | 108 | 54 | 54 | 9 | 1 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.BuildTargets
-- Copyright : (c) Duncan Coutts 2012
-- License : BSD-like
--
-- Maintainer : duncan@community.haskell.org
--
-- Handling for user-specified build targets... | DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/Simple/BuildTarget.hs | bsd-3-clause | 32,737 | 0 | 22 | 8,559 | 7,907 | 4,074 | 3,833 | 589 | 9 |
-- DataKinds is needed for deriveAll0 calls on GHC 8
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module ... | tolysz/prepare-ghcjs | spec-lts8/aeson/tests/DataFamilies/Types.hs | bsd-3-clause | 1,601 | 0 | 9 | 500 | 386 | 220 | 166 | 39 | 0 |
module Main where
import Test.DocTest
main :: IO ()
main = doctest ["-XOverloadedStrings", "Data/IP.hs", "Data/IP/RouteTable.hs"]
| DanielG/iproute | test/doctests.hs | bsd-3-clause | 132 | 0 | 6 | 17 | 36 | 21 | 15 | 4 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE OverloadedStrings #-}
-- TODO(DanBurton): remove the following once the module is done.
{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-imports #-}
module Stack.Iface where
import Data.Map (Map)
import Data.ByteString(ByteString... | wskplho/stack | src/Stack/Iface.hs | bsd-3-clause | 7,791 | 0 | 16 | 1,824 | 1,674 | 881 | 793 | 155 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE RankNTypes #-}
-- | Convert a stream of blaze-builder @Builder@s into a stream of @ByteString@s.
--
-- Adapted from blaze-builder-enumerator, written by myself and Simon Meier.
--
-- Note: if you have blaze-builder >= 0.4,... | phadej/streaming-commons | Data/Streaming/Blaze.hs | mit | 5,129 | 0 | 8 | 1,767 | 170 | 115 | 55 | 80 | 7 |
module TRS.CL where
-- $Id$
import TRS.System
import TRS.Symbol
cls :: System Symbol
cls = [ read "a (a (a (S, x), y), z) -> a (a (x, z), a (y, z))" ]
| Erdwolf/autotool-bonn | src/TRS/CL.hs | gpl-2.0 | 157 | 0 | 6 | 39 | 36 | 21 | 15 | 5 | 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="sk-SK">
<title>Automation Framework</title>
<maps>
<homeID>top</homeID>
<mapref locatio... | kingthorin/zap-extensions | addOns/automation/src/main/javahelp/org/zaproxy/addon/automation/resources/help_sk_SK/helpset_sk_SK.hs | apache-2.0 | 965 | 77 | 66 | 156 | 407 | 206 | 201 | -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="ro-RO">
<title>DOM XSS Active Scan Rule | ZAP Extension</title>
<maps>
<homeID>top</homeID>
... | thc202/zap-extensions | addOns/domxss/src/main/javahelp/org/zaproxy/zap/extension/domxss/resources/help_ro_RO/helpset_ro_RO.hs | apache-2.0 | 985 | 78 | 66 | 162 | 419 | 212 | 207 | -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="ko-KR">
<title>Linux WebDrivers</title>
<maps>
<homeID>top</homeID>
<mapref location="m... | thc202/zap-extensions | addOns/webdrivers/webdriverlinux/src/main/javahelp/org/zaproxy/zap/extension/webdriverlinux/resources/help_ko_KR/helpset_ko_KR.hs | apache-2.0 | 961 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Text.ParserCombinators.ReadPrec
-- Copyright : (c) The University of Glasgow 2002
-- License : BSD-style (see the file libraries/base/LICENSE)
--
... | oldmanmike/ghc | libraries/base/Text/ParserCombinators/ReadPrec.hs | bsd-3-clause | 4,058 | 0 | 15 | 806 | 1,035 | 568 | 467 | 80 | 2 |
x = 2^62
y = pi
main :: IO ()
main = do print x
print y
| hvr/jhc | regress/tests/5_known_bugs/Defaulting.hs | mit | 67 | 0 | 7 | 28 | 42 | 20 | 22 | 5 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.Parsec.Perm
-- Copyright : (c) Daan Leijen 1999-2001, (c) Paolo Martini 2007
-- License : BSD-style (see the file libraries/parsec/LICENSE)
--
-- Maintainer : derek.a.elkins@gmail.com
-- Stability : p... | maurer/15-411-Haskell-Base-Code | src/Text/Parsec/Perm.hs | bsd-3-clause | 6,575 | 0 | 11 | 1,413 | 1,181 | 659 | 522 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Actions.WithAll
-- License : BSD3-style (see LICENSE)
-- Stability : unstable
-- Portability : unportable
--
-- Provides functions for performing a given action on all windows of
-- the current workspace... | pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Actions/WithAll.hs | bsd-2-clause | 1,626 | 0 | 14 | 341 | 255 | 147 | 108 | 16 | 1 |
{-# LANGUAGE StandaloneDeriving, DeriveGeneric #-}
module SizedSeq
( SizedSeq(..)
, emptySS
, addToSS
, addListToSS
, ssElts
, sizeSS
) where
import Control.DeepSeq
import Data.Binary
import Data.List
import GHC.Generics
data SizedSeq a = SizedSeq {-# UNPACK #-} !Word [a]
deriving (Generic, Show)
ins... | ezyang/ghc | libraries/ghci/SizedSeq.hs | bsd-3-clause | 1,116 | 0 | 9 | 226 | 460 | 235 | 225 | 34 | 1 |
module Handler (
HandlerFunc
) where
import Network.Socket
import qualified Data.ByteString.Lazy as L (ByteString, pack, unpack, take, toChunks, fromChunks)
import Data.Word
type HandlerFunc = Socket -> SockAddr -> L.ByteString -> IO ()
| stnma7e/scim_serv | src/Handler.hs | mit | 240 | 2 | 9 | 35 | 75 | 46 | 29 | 6 | 0 |
module Wobsurv.Logging where
import BasePrelude hiding (log)
import qualified Wobsurv.Interaction
import qualified System.Locale as Locale
import qualified Data.Time as Time
import qualified Wobsurv.Util.HTTP.Renderer as HTTP.Renderer
import qualified Wobsurv.Util.HTTP.Model ... | nikita-volkov/wobsurv | library/Wobsurv/Logging.hs | mit | 1,986 | 0 | 20 | 431 | 481 | 287 | 194 | 39 | 2 |
-------------------------------------------------------------------------
-- Copyright (c) 2007-2011, 2012 ETH Zurich.
-- All rights reserved.
--
-- This file is distributed under the terms in the attached LICENSE file.
-- If you do not find this file, copies can be found by writing to:-
-- ETH Zurich D-INFK CAB F.78, ... | utsav2601/cmpe295A | hake/RuleDefs.hs | mit | 46,102 | 0 | 18 | 12,273 | 12,314 | 6,349 | 5,965 | 756 | 3 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
module Application.TopicTypes where
import Database.Persist.TH
import Data.Aeson
import GHC.Generics
data TopicType = Discussion | Presentation | Workshop deriving(Show, Read, Eq, Generic)
derivePersistField "TopicType"
... | kRITZCREEK/FROST-Backend | src/Application/TopicTypes.hs | mit | 375 | 0 | 6 | 74 | 76 | 42 | 34 | 10 | 0 |
module Patterns where
import Prelude hiding (fst,null,head)
-- PATTERN MATCHING
fst :: (t, t1) -> t
fst (a,b) = a
null :: [t] -> Bool
null [] = True
null (x:xs) = False -- anything that uses the cons operator will be automatically be read as false.
head (x:xs) = x -- note! that we take the front of the cons ... | HaskellForCats/HaskellForCats | MenaBeginning/Ch008/2014-0214patterns.hs | mit | 1,968 | 0 | 7 | 434 | 206 | 136 | 70 | 11 | 1 |
module Parse where
import qualified Data.ByteString.Lazy.Char8 as L8
import qualified Data.ByteString.Lazy as L
import Data.Char
import Data.Int
import Data.Word (Word8)
import Control.Applicative
-- data Greymap = Greymap {
-- greyWidth :: Int
-- , greyHeight :: Int
-- , greyMax :: Int
-- , greyDat... | lpenz/realworldhaskell-exercises | ch12/Parse.hs | mit | 6,649 | 0 | 18 | 2,207 | 1,394 | 754 | 640 | 105 | 3 |
module Test.Hspec.Core.ConfigSpec (spec) where
import Prelude ()
import Helper
import System.Directory
import System.FilePath
import Test.Hspec.Core.Config
spec :: Spec
spec = around_ inTempDirectory $ around_ (withEnvironment [("HOME", "foo")]) $ do
describe "rea... | hspec/hspec | hspec-core/test/Test/Hspec/Core/ConfigSpec.hs | mit | 1,458 | 0 | 20 | 368 | 403 | 201 | 202 | 35 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module AIChallenger
( startJudge
, Config(..)
, getConfigFromCommandlineFlags
) where
import Data.Function
import Data.Monoid
import Data.String
import qualified Data.Text as T
import qualified Network.Wai.Handler.Warp as Warp
import ... | ethercrow/ai-challenger | src/AIChallenger.hs | mit | 1,303 | 0 | 17 | 268 | 351 | 183 | 168 | 34 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE NoImplicitPrelude #-}
-- | Utilities for dealing with Aeson version update
module Data.Aeson.KeyHelper
( module KeyMap
, toKey
, toText
) where
import Prelude (id)
import qualified Data.Text as Text
#if MIN_VERSION_aeson (2,0,0)
import qualified Data.Aeson.... | snoyberg/keter | Data/Aeson/KeyHelper.hs | mit | 689 | 0 | 6 | 176 | 104 | 69 | 35 | 13 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Control.Schule.Typ where
import Control.Types ( UNr, Name )
import Autolib.Reader
import Autolib.ToDoc
import Autolib.Multilingual (Language(..))
import Data.Typeable
-- | das sollte exactly das sein, was auch in DB-tabelle steht
data S... | marcellussiegburg/autotool | db/src/Control/Schule/Typ.hs | gpl-2.0 | 660 | 2 | 8 | 179 | 121 | 76 | 45 | 16 | 0 |
module KDtree where
---------------------------------------------------------
import Control.Applicative
import Data.Bits
import qualified Data.Foldable as F
import qualified Data.List as L
import Vec3D
---------------------------------------------------------
data KDtree a = Node
{ kdObject... | Chase-C/KDtree | src/KDtree.hs | gpl-2.0 | 3,603 | 0 | 14 | 1,180 | 1,329 | 698 | 631 | 75 | 8 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
import Types
import Rss
import Db
import Config
import Utils
import Data.Monoid
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async
import Control.Concurrent.MVar
import Control.Monad.Reader
import Control.Monad.IO.Class
import Control.Exc... | sdroege/html-rss-proxy | src/Main.hs | gpl-3.0 | 4,596 | 0 | 22 | 1,300 | 1,269 | 652 | 617 | 89 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module Reffit.PaperRoll where
import Reffit.Types
import Reffit.AcidTypes
import Reffit.Document
import Reffit.Scores
import Reffit.Sort
import Reffit.Search
import Reffit.FieldTag
import Control.Applicative
import qualified Data.List as L
import Data.Maybe (listToMaybe)
import Dat... | imalsogreg/reffit | src/Reffit/PaperRoll.hs | gpl-3.0 | 3,112 | 0 | 21 | 651 | 946 | 488 | 458 | 71 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/Commit.hs | mpl-2.0 | 5,619 | 0 | 19 | 1,442 | 939 | 545 | 394 | 132 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Ch23Spec where
import Ch23_System_F_Universals
import Protolude
import Test.Hspec
spec :: Spec
spec = describe "ch23" $ do
idT
doubleT
selfAppT
quadrupleT
| haroldcarr/learn-haskell-coq-ml-etc | foundations/book/2002-TAPL-2005-ATAPL/tapl/test/Ch23Spec.hs | unlicense | 274 | 0 | 7 | 72 | 46 | 25 | 21 | 12 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Language.K3.Transform.Hints where
import Control.DeepSeq
import Data.Binary
import Data.Serialize
import Data.Typeable
import GHC.Generics (Generic)
import qualified Data.Set as S
import Language.K3.Core.Common
data OptHint
-- | The sets... | DaMSL/K3 | src/Language/K3/Transform/Hints.hs | apache-2.0 | 1,188 | 0 | 9 | 239 | 191 | 111 | 80 | 21 | 0 |
{- |
Module : Text.Tabl.Environment
Description : Table environments
Copyright : (c) 2016-2020 Daniel Lovasko
License : BSD2
Maintainer : Daniel Lovasko <daniel.lovasko@gmail.com>
Stability : stable
Portability : portable
Definition of various environments for table rendering.
-}
module Text.Tabl.Envir... | lovasko/tabl | src/Text/Tabl/Environment.hs | bsd-2-clause | 565 | 0 | 6 | 102 | 38 | 26 | 12 | 6 | 0 |
module Data.SimpleN3.Command where
import Data.SimpleN3.ProgType
import Data.SimpleN3.Job
commandLineProcess :: Simplen3 -> IO ()
commandLineProcess Test = do
putStrLn "test called"
startJob
| wavewave/simplen3 | lib/Data/SimpleN3/Command.hs | bsd-2-clause | 198 | 0 | 7 | 28 | 50 | 27 | 23 | 7 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
module HERMIT.Plugin.Display
( showDisplay
, printDisplay
, ps_putStr
, ps_putStrLn
) where
import Control.Monad.Reader
import Control.Monad.State
import Data.Maybe (fromMaybe)
import HERMIT.Kernel (queryK, CommitMsg(..))
impor... | beni55/hermit | src/HERMIT/Plugin/Display.hs | bsd-2-clause | 1,416 | 0 | 16 | 313 | 448 | 230 | 218 | 38 | 1 |
{-# LANGUAGE TemplateHaskell, FunctionalDependencies #-}
{-| Implementation of the Ganeti Disk config object.
-}
{-
Copyright (C) 2014 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. ... | leshchevds/ganeti | src/Ganeti/Objects/Disk.hs | bsd-2-clause | 11,305 | 0 | 19 | 2,699 | 2,391 | 1,255 | 1,136 | 202 | 17 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module Text.Syntax.Parser.Attoparsec.ByteString (
runAsAttoparsec', runAsAttoparsec,
runAsAttoparsecChar8', runAsAttoparsecChar8
) where
import Text.Syntax.Parser.Instances ()
import Text.Syntax.Poly
((<||>), TryAlternative (try, (<|>))... | khibino/haskell-invertible-syntax-attoparsec | Text/Syntax/Parser/Attoparsec/ByteString.hs | bsd-3-clause | 1,863 | 0 | 10 | 327 | 608 | 340 | 268 | 42 | 3 |
------------------------------------------------------------------------------
-- |
-- Module : GGTD.Tickler
-- Copyright : (C) 2016 Samuli Thomasson
-- License : %% (see the file LICENSE)
-- Maintainer : Samuli Thomasson <samuli.thomasson@paivola.fi>
-- Stability : experimental
-- Portabil... | SimSaladin/ggtd | src/GGTD/Tickler.hs | bsd-3-clause | 4,929 | 0 | 13 | 1,127 | 1,341 | 730 | 611 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Language.RM.TypeLevel
import Data.Proxy
import GHC.TypeLits
-- |Initialises R1 to 5, then raises 2 to the power of the value of R1,
-- leaving the result (32) in R0. Us... | kcsongor/register-machine-type | examples/Example.hs | bsd-3-clause | 1,462 | 0 | 13 | 709 | 400 | 218 | 182 | 30 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
{-|
Translate a @ClassDecl@ (see "AST") to its @CCode@ (see "CCode.Main")
equivalent.
-}
module CodeGen.ClassDecl () where
import CodeGen.Typeclasses
import CodeGen.CCodeNames
import CodeGen.MethodDecl ()
import CodeGen.ClassTable
import CodeGen.Type
import... | Paow/encore | src/back/CodeGen/ClassDecl.hs | bsd-3-clause | 16,150 | 0 | 23 | 5,325 | 4,567 | 2,363 | 2,204 | -1 | -1 |
module GEC.Datagram
( P.ContextIn, P.ContextOut, P.TagSize(..)
, mkContextIn, mkContextOut
, P.inflationOut, P.inflationIn
, encode, decode
) where
import qualified GEC.Datagram.Pure as P
import Data.ByteString (ByteString)
mkContextIn :: P.TagSize -> ByteString -> P.ContextIn
mkContextIn t m = ru... | GaloisInc/gec | src/GEC/Datagram.hs | bsd-3-clause | 843 | 0 | 8 | 150 | 288 | 156 | 132 | 17 | 1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
module Data.FAlgebra.Tree.Zipper
( module Data.FAlgebra.Base
, module Data.FAlgebra.Tree
, TreeZipSte... | bhamrick/fixalgs | Data/FAlgebra/Tree/Zipper.hs | bsd-3-clause | 4,652 | 0 | 15 | 1,250 | 1,674 | 863 | 811 | 94 | 5 |
{-# LANGUAGE RecordWildCards #-}
-- | A persistent version of the Ghci session, encoding lots of semantics on top.
-- Not suitable for calling multithreaded.
module Session(
Session, enableEval, withSession,
sessionStart, sessionReload,
sessionExecAsync,
) where
import Language.Haskell.Ghcid
import ... | ndmitchell/ghcid | src/Session.hs | bsd-3-clause | 9,509 | 0 | 20 | 2,250 | 2,622 | 1,326 | 1,296 | 178 | 3 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | This module provide an IO-based API. The /ks/ executable provides
-- some keystore management ... | cdornan/keystore | src/Data/KeyStore/IO.hs | bsd-3-clause | 13,304 | 0 | 14 | 3,394 | 3,641 | 1,849 | 1,792 | 276 | 3 |
----------------------------------------------------------------------------
-- |
-- Module : Language.Core.Interpreter.Libraries.GHC.Show
-- Copyright : (c) Carlos López-Camey, University of Freiburg
-- License : BSD-3
--
-- Maintainer : c.lopez@kmels.net
-- Stability : stable
--
--
-- Defines funct... | kmels/dart-haskell | src/Language/Core/Interpreter/Libraries/GHC/Show.hs | bsd-3-clause | 1,279 | 0 | 9 | 184 | 231 | 145 | 86 | 18 | 1 |
module GUI.Timeline.HEC (
renderHEC,
renderInstantHEC,
) where
import GUI.Timeline.Render.Constants
import Events.EventTree
import Events.EventDuration
import GUI.Types
import GUI.Timeline.CairoDrawing
import GUI.ViewerColours
import Graphics.Rendering.Cairo
import qualified GHC.RTS.Events as GHC
import G... | ml9951/ThreadScope | GUI/Timeline/HEC.hs | bsd-3-clause | 12,060 | 0 | 17 | 3,033 | 3,214 | 1,581 | 1,633 | -1 | -1 |
module Day25 where
import Data.Char
import Data.Maybe
import Safe
codeSequence :: [Int]
codeSequence = iterate next 20151125
where next c = (c * 252533) `rem` 33554393
getIndex :: (Int, Int) -> Int
getIndex (row, col) = column !! (row - 1)
where
firstRow = 1 : zipWith (+) firstRow [2..]
column = (firstRo... | patrickherrmann/advent | src/Day25.hs | bsd-3-clause | 548 | 0 | 11 | 115 | 227 | 129 | 98 | 15 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TupleSections #-}
import AuthAPI (app, authSettings, LoginForm(..), homePage, loginPage, Account(..))
import Control.Monad.IO.Class (liftIO)
import Crypto.Random (drgNew)
import Data.Default (de... | zohl/servant-auth-cookie | example/Test.hs | bsd-3-clause | 10,965 | 28 | 28 | 2,360 | 2,906 | 1,549 | 1,357 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Geekingfrog.Views.Errors where
import Data.Text as T
import Text.Blaze.Html5 as H
import Text.Blaze.Html5.Attributes as A
import Geekingfrog.Views.Partials (pageHead, navHeader, pageFooter)
genericError :: Text -> Text -> H.Markup
genericError title msg = docTypeHtml $ do
... | geekingfrog/geekingfrog.com | src/Geekingfrog/Views/Errors.hs | bsd-3-clause | 1,487 | 0 | 17 | 503 | 317 | 164 | 153 | 26 | 1 |
module Vandelay.DSL.Estimates.ParserT
( readEstimates
) where
import Control.Monad.Error.Class
import qualified Control.Monad.State as S
import qualified Data.Map.Lazy as HM
import Text.Parsec hiding (many, optional, (<|>))
import Vandelay.DSL.Core ... | tumarkin/vandelay | src/Vandelay/DSL/Estimates/ParserT.hs | bsd-3-clause | 3,999 | 0 | 17 | 945 | 1,345 | 710 | 635 | -1 | -1 |
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE UndecidableInstances #-}
module BitRecordsSpec (spec) where
import Data.Bits
import qualified Data.ByteString.Lazy as B
import Data.Kind.Extra
import Data.Proxy
import Data.Type.BitRecords
import Data.Type.Equality ()
import GHC.TypeLits
import Test.Hspec
import Test.... | sheyll/isobmff-builder | spec/BitRecordsSpec.hs | bsd-3-clause | 18,220 | 5 | 57 | 5,350 | 5,205 | 2,623 | 2,582 | -1 | -1 |
{-# LANGUAGE EmptyDataDecls, NoMonomorphismRestriction #-}
{-# LANGUAGE TypeFamilies #-}
-- | Context-free grammar with quantifiers
-- A different ways to add quantification, via
-- Higher-Order abstract syntax (HOAS).
-- This is a "rational reconstruction" of Montague's
-- general approach of `administrative pronoun... | suhailshergill/liboleg | Lambda/QHCFG.hs | bsd-3-clause | 2,743 | 0 | 17 | 610 | 542 | 301 | 241 | 26 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
-- | Template Haskell splices to create constant-sized vectors and RingBuffer
-- instances for them
module Data.RingBuffer.TGen (
mkVecFromTo
,mkVec
)
where
import Prelude hiding (length)
import... | JohnLato/combobuffer | src/Data/RingBuffer/TGen.hs | bsd-3-clause | 2,684 | 2 | 19 | 696 | 827 | 424 | 403 | 53 | 3 |
{-# LANGUAGE FlexibleContexts #-}
module Music.Parts.Part
(
Part,
_solo,
_subpart,
_instrument,
divide,
containsPart,
smallestPart,
smallestSubpart,
largestPart,
largestSubpart,
distinctFrom,
allDistinct,
solo,
tutti,
)
where
import Control.Applicative
import Control.Lens (toLi... | music-suite/music-parts | src/Music/Parts/Part.hs | bsd-3-clause | 4,759 | 0 | 13 | 1,275 | 1,430 | 772 | 658 | 109 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
module Data.Vinyl.Aeson (recordFromJSON, recordToJSON, KnownSymbols) where
import Data.Aeson
import Data.Aeson.Types
import Data.Proxy
import Data.V... | plow-technologies/template-service | master/src/Data/Vinyl/Aeson.hs | bsd-3-clause | 3,378 | 0 | 17 | 628 | 1,025 | 540 | 485 | -1 | -1 |
-- |Partial binding to CoreFoundation.
-- At the moment only CFString is supported.
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls #-}
module System.MacOSX.CoreFoundation
( -- * types
UInt8
, UInt16
, UInt32
, UInt64
, SInt8
, SInt16
, SInt32
, SInt64
, OSErr
, OSStatus
, ... | chpatrick/hmidi | System/MacOSX/CoreFoundation.hs | bsd-3-clause | 3,155 | 0 | 12 | 631 | 718 | 399 | 319 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Cauterize.Crucible.PrototypesSpec
( spec
) where
import Test.Hspec
import Cauterize.Crucible.Prototypes
spec :: Spec
spec = do
describe "parsePrototypeVariant" $
it "is able to parse all prototypes" $ do
parsePrototypeVariant "synonym" `shouldBe` Just PVSynon... | cauterize-tools/crucible | test/Cauterize/Crucible/PrototypesSpec.hs | bsd-3-clause | 1,158 | 0 | 12 | 187 | 257 | 132 | 125 | 22 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternGuards #-}... | dmjio/aeson | src/Data/Aeson/Types/ToJSON.hs | bsd-3-clause | 97,210 | 0 | 16 | 22,851 | 26,477 | 13,999 | 12,478 | -1 | -1 |
{-# LANGUAGE
ConstraintKinds
, FlexibleInstances
, FlexibleContexts
, GeneralizedNewtypeDeriving
, MultiParamTypeClasses
, ScopedTypeVariables
, TemplateHaskell
, TypeFamilies
, TypeOperators
, TypeSynonymInstances
, UndecidableInstances
#-}
---------------------------------------------------------------... | mgsloan/toy-diagrams | src/Graphics/UI/Toy/Button.hs | bsd-3-clause | 3,456 | 0 | 13 | 811 | 726 | 407 | 319 | 58 | 1 |
-- vim:sw=2:ts=2:expandtab:autoindent
module Main where
-- example of generating three test cases of 6 integer variables
-- l1, u1, i, l2, u2, j sush that l1 < i <= u1 and l2 < j <= u2.
import Math.SMT.Yices.Parser
import Math.SMT.Yices.Syntax
import Math.SMT.Yices.Pipe
import Data.List
import Control.Monad
-- impo... | airobert/yices_haskell | Main.hs | bsd-3-clause | 5,351 | 0 | 19 | 1,357 | 1,633 | 887 | 746 | 84 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Configure
-- Copyright : Isaac Jones 2003-2005
-- Lice... | randen/cabal | Cabal/Distribution/Simple/Configure.hs | bsd-3-clause | 93,156 | 1 | 26 | 28,171 | 15,652 | 8,252 | 7,400 | 1,364 | 14 |
module Main where
import Test.Balance
import Test.Correctness
import Test.IntervalSet
import Test.Tasty
import Test.Tasty.SmallCheck
import Test.Validity
main :: IO ()
main = defaultMain $ localOption (SmallCheckDepth 7) $ testGroup "Tests" [
testGroup "Correctness" [
testProperty "Interval Un... | ian-mi/interval-set | tests/Test.hs | bsd-3-clause | 1,157 | 0 | 10 | 343 | 184 | 96 | 88 | 23 | 1 |
{-# LANGUAGE DeriveFunctor #-}
module Subscription
(
SubscriptionTree (..),
broadcast,
broadcast',
empty,
subscribe,
unsubscribe,
showTree,
)
where
import Control.Monad (void)
import Control.Monad.Writer (Writer, tell, execWriter)
import Data.Aeson (Value)
import Data.Foldable (for_, traverse_)
import D... | channable/icepeak | server/src/Subscription.hs | bsd-3-clause | 4,246 | 0 | 21 | 925 | 1,198 | 632 | 566 | 89 | 3 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
-----------------------------------------------... | cchalmers/geometry | src/Geometry/ThreeD/Transform.hs | bsd-3-clause | 13,184 | 0 | 13 | 2,974 | 3,331 | 1,776 | 1,555 | -1 | -1 |
-- | Module providing restoring from backup phrase functionality
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableIns... | input-output-hk/pos-haskell-prototype | mnemonic/src/Cardano/Mnemonic.hs | mit | 11,708 | 0 | 16 | 3,100 | 2,255 | 1,251 | 1,004 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-storagegateway/gen/Network/AWS/StorageGateway/CreateSnapshot.hs | mpl-2.0 | 5,938 | 0 | 11 | 1,209 | 614 | 377 | 237 | 70 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-storagegateway/gen/Network/AWS/StorageGateway/CreateCachediSCSIVolume.hs | mpl-2.0 | 6,971 | 0 | 11 | 1,482 | 876 | 525 | 351 | 106 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module T10279 where
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
-- NB: rts-1.0 is used here because it doesn't change.
-- You do need to pick the right version number, otherwise the
-- error message doesn't recognize it as a source package ID,
-- (This is OK, since it... | mpickering/ghc-exactprint | tests/examples/ghc8/T10279.hs | bsd-3-clause | 506 | 0 | 13 | 80 | 71 | 42 | 29 | 5 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.ModuleTest
-- Copyright : Isaac Jones 2003-2004
--
-- Maintainer : Isaac Jones <ijones@syntaxpolice.org>
-- Stability : alpha
-- Portability : GHC
--
-- Explanation: Test this module and sub modu... | alekar/hugs | packages/Cabal/tests/ModuleTest.hs | bsd-3-clause | 23,560 | 43 | 18 | 7,137 | 3,259 | 1,738 | 1,521 | 1 | 0 |
-- {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
module ShouldSucceed where
class Eq2 a where
doubleeq :: a -> a -> Bool
class (Eq2 a) => Ord2 a where
lt :: a -> a -> Bool
instance Eq2 Int where
doubleeq x y = True
instance Ord2 Int where
lt x y = True
instance (Eq2 a,Ord2 a) => Eq2 [a] where
doubleeq ... | rahulmutt/ghcvm | tests/suite/typecheck/compile/tc058.hs | bsd-3-clause | 357 | 0 | 8 | 83 | 148 | 77 | 71 | 12 | 1 |
module Parse.Module (header, headerAndImports, getModuleName) where
import Control.Applicative ((<$>), (<*>))
import Data.List (intercalate)
import Text.Parsec hiding (newline, spaces)
import Parse.Helpers
import qualified AST.Module as Module
import qualified AST.Variable as Var
getModuleName :: String -> Maybe St... | JoeyEremondi/utrecht-apa-p1 | src/Parse/Module.hs | bsd-3-clause | 2,551 | 0 | 15 | 657 | 798 | 398 | 400 | 74 | 2 |
module Parser where
import Data.Attoparsec.Text
weirdParser :: Parser Char
weirdParser = do -- attoparsec's Parser type has a useful monad instance
char '|' -- matches just '|', fails on any other char
c <- anyChar -- matches any character (but just one) and returns it
char '|' -- matches just '|'... | alpmestan/hspec-attoparsec | example/Parser.hs | bsd-3-clause | 401 | 0 | 7 | 94 | 53 | 28 | 25 | 8 | 1 |
module Main where
import Control.Monad
import Control.Monad.IO.Class
import System.Environment
import System.IO
import Transient.Base
import Transient.Indeterminism
import Transient.Logged
import Transient.Move
import Transient.S... | agocorona/transient | tests/Test3.hs | mit | 1,690 | 0 | 14 | 597 | 466 | 227 | 239 | 42 | 2 |
{- |
Module : $Header$
Description : Parser of the Knowledge Interchange Format
Copyright : (c) Karl Luc, DFKI Bremen 2010, Eugen Kuksa and Uni Bremen 2011, Soeren Schulze 2012
License : GPLv2 or higher, see LICENSE.txt
Maintainer : s.schulze@uni-bremen.de
Stability : provisional
Portability : por... | keithodulaigh/Hets | CommonLogic/Parse_KIF.hs | gpl-2.0 | 5,482 | 0 | 17 | 1,413 | 1,733 | 893 | 840 | 112 | 3 |
import Graphics.UI.Gtk
main:: IO ()
main = do
initGUI
window <- windowNew
set window [windowTitle := "Labels", containerBorderWidth := 10 ]
mainbox <- vBoxNew False 10
containerAdd window mainbox
hbox <- hBoxNew True 5
boxPackStart mainbox hbox PackNatural 0
vbox1 <- vBoxNew Fal... | mimi1vx/gtk2hs | docs/tutorial/Tutorial_Port/Example_Code/GtkChap4-3.hs | gpl-3.0 | 2,384 | 0 | 9 | 557 | 580 | 258 | 322 | 57 | 1 |
{-
*********************************************************************************
* *
* John Hughes's and Simon Peyton Jones's Pretty Printer Combinators *
* ... | alexander-at-github/eta | compiler/ETA/Utils/Pretty.hs | bsd-3-clause | 37,510 | 0 | 27 | 14,083 | 7,640 | 3,970 | 3,670 | 442 | 14 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Utility functions on @Core@ syntax
-}
{-# LANGUAGE CPP #-}
module CoreSubst (
-- * Main data types
Subst(..), -- Implementation exported for supercompiler's Renaming.hs only
TvSubstEnv, IdSubstEnv,... | vikraman/ghc | compiler/coreSyn/CoreSubst.hs | bsd-3-clause | 59,295 | 1 | 16 | 15,076 | 11,388 | 5,980 | 5,408 | 682 | 13 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP #-}
#ifdef __GLASGOW_HASKELL__
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.SampleVar
-- Copyright : (c) The University of Glasgow 2... | beni55/haste-compiler | libraries/ghc-7.8/base/Control/Concurrent/SampleVar.hs | bsd-3-clause | 4,261 | 0 | 18 | 1,108 | 660 | 372 | 288 | -1 | -1 |
module Foo () where
import Language.Haskell.Liquid.Prelude
{-@ gpp :: Monad m => m {v:Int|v>=0} -> m {v:Int|v>=0} @-}
gpp :: Monad m => m Int -> m Int
gpp z = do x <- z
return $ liquidAssert (x >= 0) (x + 1)
xM :: [Int]
xM = gpp [0]
| mightymoose/liquidhaskell | tests/pos/monad6.hs | bsd-3-clause | 249 | 0 | 10 | 67 | 97 | 52 | 45 | 7 | 1 |
import Foreign.StablePtr
-- compile without optimisation.
-- run with +RTS -D256 to see the stable pointer being garbage collected.
main = do
let xs = [ 1 .. 50000 ]
let ys = [ 1 .. 60000 ]
s1 <- newStablePtr xs
print (sum xs)
freeStablePtr s1
print (sum ys)
| beni55/ghcjs | test/pkg/base/stableptr004.hs | mit | 273 | 0 | 10 | 64 | 83 | 40 | 43 | 8 | 1 |
module Bit where
import LogFun
import Signal
data Bit = Bot | WeakZero | WeakOne | Zero | One | Top
deriving (Eq,Show{-was:Text-})
instance Static Bit where
intToSig = intToSigBit
sigToInt = sigToIntBit
showStaticSig = showBit
instance Lattice Bit where
bot = Bot
top = Top
weakZero = WeakZero
weakOne... | forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/programs/jtod_circint/Bit.hs | bsd-3-clause | 5,183 | 0 | 12 | 3,091 | 1,237 | 638 | 599 | 167 | 36 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PartialTypeSignatures #-}
module Data.Arra... | epsilonhalbe/accelerate-typelits | src/Data/Array/Accelerate/TypeLits/Internal.hs | isc | 5,638 | 0 | 12 | 1,579 | 1,928 | 1,035 | 893 | 92 | 2 |
module Graphics.Urho3D.Container.ForeignVector(
ReadableVector(..)
, foreignVectorForeach
, WriteableVector(..)
, ForeignVectorRepresent(..)
, ForeignVector
) where
import Foreign
import Control.DeepSeq
import Control.Monad.IO.Class
import Control.Monad.Catch
import qualified Data.Vector as V
import qual... | Teaspot-Studio/Urho3D-Haskell | urho3d-bindgen/src/Graphics/Urho3D/Container/ForeignVector.hs | mit | 6,549 | 0 | 13 | 1,177 | 1,869 | 943 | 926 | -1 | -1 |
module Unscramble.Score (
ScoringSystem(..),
score
) where
import Data.Array ((!))
import Data.Maybe
import Unscramble.Types
score :: ScoringSystem -> Search -> [Coordinate] -> Int
score Boggle _ = scoreBoggle
score SWF s = scoreSWF s
score WordWars s = scoreWordWars s
scoreBoggle :: [Coordinate] -> Int
scor... | pikajude/unscramble | src/Unscramble/Score.hs | mit | 2,338 | 0 | 15 | 949 | 1,081 | 639 | 442 | 58 | 14 |
module AbsAp2 where
undefined x = undefined x
test a = undefined a
| Lemmih/haskell-tc | tests/AbsAp2.hs | mit | 69 | 0 | 5 | 15 | 26 | 13 | 13 | 3 | 1 |
{-# htermination (showSigned :: (Float -> (List Char) -> (List Char)) -> MyInt -> Float -> (List Char) -> (List Char)) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data Char = Char MyInt ;
data Float = Float MyInt MyInt ;
data MyInt = Pos Nat | Neg N... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/showSigned_2.hs | mit | 4,459 | 0 | 103 | 884 | 2,374 | 1,234 | 1,140 | 83 | 1 |
module Widget.Pagination (
paginationWidget
) where
import Import
import qualified Glot.Pagination as Pagination
paginationWidget :: Route App -> Pagination.Pagination -> Int -> [(Text, Text)] -> Widget
paginationWidget route pagination currentPage queryExtra =
$(widgetFile "widgets/pagination")
query :: Tex... | prasmussen/glot-www | Widget/Pagination.hs | mit | 408 | 0 | 10 | 60 | 129 | 74 | 55 | -1 | -1 |
module Tarefa1_2017li1g186 where
import LI11718
testesT1 :: [Caminho]
testesT1 = []
constroi :: Caminho -> Mapa
constroi c = undefined | hpacheco/HAAP | examples/plab/svn/2017li1g186/src/Tarefa1_2017li1g186.hs | mit | 137 | 0 | 5 | 22 | 39 | 23 | 16 | 6 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Data.List
import System.CPUTime
notWhole :: Double -> Bool
notWhole x = fromIntegral (round x) /= x
cat :: Double -> Double -> Double
cat l m | m < 0 = 3.1
| l == 0 = 3.1
| notWhole l = 3.1
| notWhole m = 3.1
| otherwise = read ... | dschalk/score3 | impossibles.hs | mit | 3,806 | 0 | 13 | 1,636 | 1,894 | 1,095 | 799 | 71 | 1 |
module ViewPortTransform ( zoom
, translateViewPort
, zoomWithPivot
) where
import Graphics.Gloss.Data.ViewPort
import Vector
zoom :: Float -> ViewPort -> ViewPort
zoom step viewPort = viewPort {
viewPortScale = max (sca... | tsoding/boids | src/ViewPortTransform.hs | mit | 1,162 | 0 | 9 | 492 | 236 | 130 | 106 | 20 | 1 |
module Communication.RWChan(RWChan(),
newRWChanIO,
flipRWChan,
writeRWChan,
readRWChan,
tryReadRWChan)
where
import Control.Monad
import Control.Concurrent
import Control.Concur... | Noeda/Megaman | src/Communication/RWChan.hs | mit | 767 | 0 | 8 | 240 | 243 | 133 | 110 | 23 | 1 |
-- Copyright (c) Microsoft. All rights reserved.
-- Licensed under the MIT license. See LICENSE file in the project root for full license information.
{-# LANGUAGE QuasiQuotes, OverloadedStrings, RecordWildCards #-}
module Language.Bond.Codegen.Cpp.ApplyOverloads (applyOverloads, Protocol(..)) where
import Data.Mono... | alfpark/bond | compiler/src/Language/Bond/Codegen/Cpp/ApplyOverloads.hs | mit | 2,630 | 0 | 12 | 500 | 253 | 156 | 97 | 21 | 1 |
{-
Copyright (c) 2008-2015 the Urho3D project.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publis... | Teaspot-Studio/Urho3D-Haskell | app/sample04/Main.hs | mit | 10,818 | 0 | 18 | 2,015 | 1,901 | 900 | 1,001 | -1 | -1 |
{-|
Module : Data.MessagePack.Spec
Description : Message Pack specification values
Copyright : (c) Rodrigo Setti, 2014
License : MIT
Maintainer : rodrigosetti@gmail.com
Stability : experimental
Portability : portable
Define, in a single place, all the message-pack specification binary type
markers.
-}
mo... | rodrigosetti/messagepack | Data/MessagePack/Spec.hs | mit | 2,651 | 0 | 4 | 908 | 464 | 296 | 168 | 84 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE ViewPatterns #-}
module QuadraticIrrational (tests) where
import Data.Number.CReal (CReal)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck
import Numeric.QuadraticIrrational
import Numeric.QuadraticIrrational.Internal.Lens
-- Slow but p... | ion1/quadratic-irrational | tests/QuadraticIrrational.hs | mit | 7,381 | 0 | 19 | 2,393 | 3,132 | 1,576 | 1,556 | 142 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.FocusEvent
(js_getRelatedTarget, getRelatedTarget, FocusEvent,
castToFocusEvent, gTypeFocusEvent)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, mayb... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/FocusEvent.hs | mit | 1,412 | 6 | 10 | 170 | 371 | 236 | 135 | 24 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.